# $Id$
# Maintainer: Ray Rashif <schiv@archlinux.org>
# Contributor: SpepS <dreamspepser at yahoo dot it>
# Contributor: see .contrib

pkgname=ardour
pkgver=5.9
pkgrel=2
pkgdesc="Professional-grade digital audio workstation"
arch=('i686' 'x86_64')
url="http://ardour.org/"
license=('GPL')
depends=('liblrdf' 'liblo' 'lilv' 'suil' 'taglib'
         'aubio' 'rubberband' 'gtkmm')
makedepends=('git' 'python2' 'boost' 'cppunit' 'doxygen' 'graphviz')
optdepends=('xjadeo: video monitoring'
            'harvid: video timeline')
source=("$pkgname-$pkgver::git+https://github.com/${pkgname^}/$pkgname.git#tag=$pkgver"
        "$pkgname.desktop")
md5sums=('SKIP'
         'dc653c227bc34aa6c729a4c2149308a7')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"

  # python2 fix
  sed -i 's/python ${SRC}/python2 ${SRC}/' libs/pbd/wscript
}

build() {
  cd "$srcdir/$pkgname-$pkgver"

  python2 waf configure --prefix=/usr \
                        --configdir=/etc \
                        --with-backends="jack,alsa" \
                        --libjack=weak \
                        --optimize \
                        --docs \
                        --cxx11 \
                        --no-phone-home

  python2 waf build $MAKEFLAGS
}

package() {
  cd "$srcdir/$pkgname-$pkgver"

  python2 waf install --destdir="$pkgdir"

  # install some freedesktop.org compatibility
  install -Dm644 "$srcdir/$pkgname.desktop" \
    "$pkgdir/usr/share/applications/$pkgname.desktop"
}

# vim:set ts=2 sw=2 et:
